n = int(input("请输入要排列的菱形行数："))
for i in range(1, n + 1, 2):
    col = 0
    while col <= ((n + 5) - (i + 1)):
        print(' ', end='')
        col += 1
    print(i*'* ')
    print()

for j in range(n - 2, 0, -2):
    col = 0
    while col <= ((n+5) - (j + 1)):
        print(' ', end='')
        col += 1
    print(j*'* ')
    print()





